package ch.myDungeons.gameObjects;


/**
 * An armor that grants an armor bonus to its owner and can be weared
 * @author Grii
 *
 */
public class Armor extends Item {
	private static final long serialVersionUID = 1358555211893506049L;
	
	/** Armor bonus */
	public int armorBonus = 0;
		
	public Armor (String itemName, int armorBonus) {
		super(itemName);
		this.armorBonus = armorBonus;
	}
	
	/** Returns a copy of the item */
	public Armor getCopy() {
		Armor copy = new Armor(name, armorBonus);
		return copy;
	}
	
	/** returns name, count, itemtype, armorBonus. split at ITEMINFO */
	public String getSave() {
		String result = super.getSave() + "<ITEMINFO>armor<ITEMINFO>" + armorBonus;
		return result;
	}
}
